package com.sumainfor.wx.tenant.controller;

import com.sumainfor.wx.tenant.service.impl.TenantIdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author Meng
 * @ClassName TenantIdController
 * @date 2019/8/29 9:55
 * @description: TODO tenid查询标准接口
 */
@RestController
@RequestMapping("/tenId/query")
public class TenantIdController {

    @Autowired
    private TenantIdService tenantIdService;


    /**
     * @Description //TODO 根据租客姓名或手机号模糊查询tenId列表
     * @return java.util.List<java.lang.String>
     * @Param [params]
     * @Date 2019/8/29 9:59
     **/
    @GetMapping("getTenIdListByLikeNameOrPhone")
    public List<String> getTenIdListByLikeNameOrPhone(@RequestParam String params) {

        return tenantIdService.getTenIdListByLikeNameOrPhone(params);
    }

    /**
     * @Description //TODO 根据租客姓名或手机号查询tenId列表
     * @return java.util.List<java.lang.String>
     * @Param [params]
     * @Date 2019/8/29 9:59
     **/
    @GetMapping("getTenIdListByNameOrPhone")
    public List<String> getTenIdListByNameOrPhone(@RequestParam String params) {
        return tenantIdService.getTenIdListByNameOrPhone(params);
    }

}
